package pl.prv.polanie.client.dto;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * SubjectDTO entity. @author MyEclipse Persistence Tools
 */

public class SubjectDTO extends Object implements IsSerializable {


    // Fields    

     private long id;
     private SubjectTypeDTO subjectType;
     private SubjectNameDTO subjectName;


    // Constructors

    /** default constructor */
    public SubjectDTO() {
    }

    
    /** full constructor */
    public SubjectDTO(SubjectTypeDTO subjectType, SubjectNameDTO subjectName) {
        this.subjectType = subjectType;
        this.subjectName = subjectName;
    }

   
    // Property accessors

    public long getId() {
        return this.id;
    }
    
    public void setId(long id) {
        this.id = id;
    }




	public SubjectTypeDTO getSubjectType() {
		return subjectType;
	}


	public SubjectNameDTO getSubjectName() {
		return subjectName;
	}


	public void setSubjectType(SubjectTypeDTO subjectType) {
		this.subjectType = subjectType;
	}


	public void setSubjectName(SubjectNameDTO subjectName) {
		this.subjectName = subjectName;
	}


	//@Override
	public String toString() {
		String result = "" +
		"[ " + SubjectDTO.class + "]" +
		"subjectName: " + subjectName + 
		", subjectType: " + subjectType
		;
		return result;
	}
	
	
	public String toLabel() {
		String result = "" +
			getSubjectName().getName() + " " +
			"(" + getSubjectName().getSymbol() + ") " +
			"[" + getSubjectType().getInitial() + "]";
		return result;
	}
    
	
	
	
	
    
   
}